feat: add trueblocks image#384
Conversation
|
One more question, why did they stop publishing new releases? Is this a dead project, if so, why are we not just straight up forking it, and pushing the images from the source repo, or if its really dead and we don't wanna maintain it going forward, why do we need it at all, aren't there any alternatives? |
Co-authored-by: Barnabas Busa <barnabas.busa@ethereum.org> Signed-off-by: Chase Wright <chase.wright@ethereum.org>
It is not a dead project, they're working on 6v, there have been commits as recently as 2 weeks ago. They don't push Docker images because TJ has always been opinionated on how TrueBlocks should be ran, and isn't a big Docker guy. They stopped maintaining the "docker" repo, but we don't need a whole repo dedicated to docker to run chifra. There are some alternatives to SOME of the use cases that TrueBlocks/chifra fulfills, but most of them are not as CROPS aligned and TrueBlocks is purpose built for indexing and querying some useful data we can't get without a full blow block explorer API. Maintenance should be very minimal moving forward (now that you pushed me to simplify the setup and un-slopify it 😆). However, if you don't feel this should live here, I'll withdraw the PRs, it's not a big deal either way. I wanted to run TrueBlocks on a devnet using kurtosis and this felt like the best way to contribute. |
# Conflicts: # branches.yaml
## Summary Adds `trueblocks` as an `additional_services` option that runs [chifra](https://github.com/TrueBlocks/trueblocks-core) daemon — the TrueBlocks REST API — against a participant EL on container port 8080. Per-chain `trueBlocks.toml` is rendered for the active network (`network_params.network` / `network_id`), and `allocs.csv` is pre-staged for unknown chains so `chifra`'s archive check passes. Image is published from [ethpandaops/eth-client-docker-image-builder#384](ethpandaops/eth-client-docker-image-builder#384). The package runs `chifra daemon` only. The scraper isn't started automatically — POST `/scrape` on the daemon (or run `chifra scrape` against the same data dir) when you want to build the local [Unchained Index](https://trueblocks.io/docs/install/get-the-index/). The other chifra endpoints (`/status`, `/blocks`, `/receipts`, `/transactions`, `/traces`, `/logs`) work without an index — they're chifra-flavored RPC pass-through. ## Configuration ```yaml trueblocks_params: image: "ethpandaops/trueblocks:v5.9.3" # Verbatim RPC URL chifra should target. Leave empty to use # all_el_contexts[target_index] (the in-cluster participant). target_rpc_url: "" target_index: 0 scrape: # written into trueBlocks.toml; 0 = network-aware default apps_per_chunk: 0 snap_to_grid: 0 first_snap: 0 unripe_dist: 0 env: {} ``` Devnet example: ```yaml participants: - el_type: erigon cl_type: lighthouse additional_services: - trueblocks ``` ## Notes `chifra`'s `IsNodeArchive` does a CSV-vs-RPC consistency check rather than a real archive probe, so it returns `false` on chains we don't ship a bundled `allocs.csv` for. The launcher works around it by writing a self-consistent `allocs.csv` for the active chain in a one-shot `plan.run_sh` bootstrap (probes the first prefund's actual block-0 balance, drops the rendered toml in alongside the image's bundled per-chain configs, stores the result as a files artifact mounted into the daemon container). Filed upstream: [TrueBlocks/trueblocks-core#4044](TrueBlocks/trueblocks-core#4044). We considered khedra (the official `chifra daemon` + `chifra scrape` unified successor) but its startup `Configured()` check requires a reachable mainnet RPC returning chainId 1, which doesn't fit hermetic devnets. Filed upstream: [TrueBlocks/trueblocks-khedra#22](TrueBlocks/trueblocks-khedra#22) — if a headless mode lands, we can migrate. ## Test plan - [x] Erigon + Lighthouse devnet: daemon comes up healthy, `/status` returns `isArchive: true, isTracing: true, trueblocksVersion: GHC-TrueBlocks//5.9.3`; `/blocks?blocks=0` returns genesis; `/list?addrs=<prefund>` returns appearances after a `POST /scrape`; `/chunks?mode=index` reflects the new chunk. - [x] bal-devnet-7 client images (Erigon + Reth × Lighthouse + Lodestar matrix, fulu @ 0, gloas @ 9): same checks pass against chifra v5.9.3 + erigon 3.5.0. - [x] `kurtosis lint --format` clean; `kurtosis run --dry-run` clean.
Summary
Adds an
ethpandaops/trueblocksimage build (chifrafromTrueBlocks/trueblocks-core). Consumed by ethpandaops/ethereum-package#1404 to run the chifra daemon as a kurtosis additional service. TrueBlocks stopped publishing official Docker images afterv5.0.0.Files
trueblocks/Dockerfilegolang:1.25.1-bookworm→debian:bookworm-slim, ENTRYPOINT chifra.github/workflows/build-push-trueblocks.ymlbuild-push-slashoor.yml)branches.yamltrueblocks: [main, v5.9.3]platforms.yamltrueblocks: [linux/amd64, linux/arm64]generate_config.py'trueblocks': 'TrueBlocks/trueblocks-core'toDEFAULT_REPOSREADME.mdThe image also ships chifra's bundled per-chain configs (
allocs.csvetc.) fromsrc/other/install/per-chain/.Test plan
docker buildx build --file ./trueblocks/Dockerfile <source>againstv5.9.3— succeeds, image is 139 MB./statusreturnsisArchive: true,trueblocksVersion: GHC-TrueBlocks//5.9.3;/blocks,/list,/chunksall respond.ethpandaops/trueblocks:v5.9.3andethpandaops/trueblocks:maintags.